<template>
	<view class="">
			<view class="hy-item" v-for="(item,index) in hylist" :key="index" :data-index="index" @click="selectedHy">
				{{item}}
				<image v-if="index == current" class="picture" src="../../static/register/xz.png" mode=""></image>
			</view>
	</view>
</template>

<script>
	export default{		
		data(){
			return{
				hylist:['农林牧渔业','建筑业','地产业','批发零售业','教育'],
				show: false,
				current:0,
				params:{}
			}
		},
		onLoad(options){
			let data = JSON.parse(decodeURIComponent(options.data));
			if(data) this.params = data;
			this.current = this.hylist.indexOf(this.params.hy)
		},
		methods:{
			selectedHy(e){
				let index = e.currentTarget.dataset.index;
				this.current = index;
				this.params.hy =this.hylist[index]; 
				this.$mRouter.push({
					route:this.$mRoutesConfig.register,
				 	query:{
				 		hy:encodeURIComponent(JSON.stringify(this.params))
				 	}
				})
			}
		},
		
	}
</script>

<style>
	
	.hy-item{
		display: flex;
		align-items: center;
		justify-content: space-between;
		height: 92rpx;
		line-height: 100rpx;
		font-size: 30rpx;
		border-bottom: 2rpx solid #DADFED;
		padding-left: 20rpx;
		width: 90%;
		margin-left: 5%;
		color: #0D1D36;
		
	}
	.picture{
		width: 44rpx;
		height: 44rpx;
	}
	.hy-item:hover{
			border-bottom: 1px solid #AB61FF;
			color: #AB61FF;
	}
</style>
